home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 July
/
EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso
/
earkit
/
news
/
thor
/
hd-install
/
thor25_arexx.lha
/
Examples
/
CountFiles.br
< prev
next >
Wrap
Text File
|
1995-09-06
|
872b
|
51 lines
/* CountFiles.br
*
* Count the files in a file database..
*/
parse arg argument
if(argument = '') then
do
say '$VER: CountFiles.br V3.1 (27.01.95)'
say 'Template: BBSNAME/A'
exit
end
if ~show('p', 'BBSREAD') then do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
end
address BBSREAD
GETFAREALIST stem FAREALIST argument
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
files = 0
say 'Available file areas:'
do i=1 to FAREALIST.COUNT
GETFAREADATA fareaname FAREALIST.i stem FAREADATA argument
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
say ' ' || left(FAREALIST.i,20) || right(FAREADATA.NUMFILES, 6)
files = files + FAREADATA.NUMFILES
end
say left("",21) || "------"
say right("Sum: ", 21) || right(files, 6)
say left("",21) || "======"
exit